import {
	findNodeHandle, UIManager
} from "react-native";
import HTTP from '../../../../utils/http';
import { API, API_GENERATE } from '../../../../config/api';

/*
  获取审批列表
  approveType  订单->O  付款申请->P  授信—>C  合同变更->A
*/
class NewOilApproveService {

	//审批列表
	getApproveList(params, tabIndex, sendData = {}) {
		if (params.isCancel) {//撤销
			console.log('111111111111111111撤单')
			// return HTTP.POST(API_GENERATE(API.GET_NEW_OIL_LOT_CANCEL), sendData);
			return HTTP.POST(API_GENERATE(API.GET_NEW_OIL_CANCEL_PUSH), sendData); //撤单
		} else {
			console.log('222222222222222222')
			return HTTP.POST(API_GENERATE(API.GET_NEW_OIL_LOT), sendData);
		}

	}

	PROCESS_DEFINITION_KEY = [
		{
			orderType: 'P',
			bizMode: 0,
			processDefinitionKey: 'process_zxy_purchase_order',
		},
		{
			orderType: 'S',
			bizMode: 0,
			processDefinitionKey: 'process_zxy_sales_order',
		},
		{
			orderType: 'S',
			bizMode: 1,
			processDefinitionKey: 'process_zxy_oppo_sales_order',  //process_zxy_cancel_order
		}
	]
}

module.exports = new NewOilApproveService();
